<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

	<head>
		<title>[%$ESPCMS_SOFT_TITLE%]</title>
		<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
		<link href="[%$ESPCMS_ADMIN_TEMPLATES_URL%]css/espcms_style_font_icon.css" rel="stylesheet" type="text/css" />
		<link href="[%$ESPCMS_ADMIN_TEMPLATES_URL%]css/espcms_style_public.css" rel="stylesheet" type="text/css" />
		<link href="[%$ESPCMS_ADMIN_TEMPLATES_URL%]css/espcms_all.css" rel="stylesheet" type="text/css" />
		<link href="[%$ESPCMS_ADMIN_TEMPLATES_URL%]css/espcms_style_font_icon.css" rel="stylesheet" type="text/css" />
		<link href="[%$ESPCMS_ADMIN_TEMPLATES_URL%]css/espcms_framework.css" rel="stylesheet" type="text/css" />
		<link href="[%$ESPCMS_ADMIN_TEMPLATES_URL%]css/espcms_select.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/jquery.min.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/jquery-ui.min.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/jquery.cookie.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/md5.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/json.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/bootstrap.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/lngpack_cn.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/espcms_form.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/espcms_formvalidation.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/espcms_dialog.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/espcms_function.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/espcms_page.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/espcms_select.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/espcms_checkbox.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/espcms_select_checkbox.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/espcms_batch.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/iframeResizer.contentWindow.min.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/espcms_tab.js"></script>
		<script type="text/javascript">
			$(document).ready(function () {
				banpageKey();

				$('#espcms_select_botton').select_checkbox();
				loading('ajax_list');

				$('.refresh').click(function () {
					loading('ajax_list');
				});
				add_espcms_window_tab();
			});

			function loading(formname) {
				var listurl = $('#listurl').val();
				$.ajax({
					type: "get", url: listurl, global: false,
					beforeSend: function () {
						$('#loadingtable').show();
					},
					success: function (data) {
						$('#loadingtable').hide();
						$('#loadingstr').empty().append(data);

						$('input[type=checkbox],input[type=radio]').espcms_checkbox();
						$('.sort_field').fieldsort();
						[%if @this->power('optimizeDatabase')%]
						optimizeDatabase();
						[%/if%]
					}
				});
			}
			[%if @this->power('optimizeDatabase')%]

			function optimizeDatabase() {
				$('.optbutton').unbind('click').bind('click', function () {
					var exurl = $(this).attr('exurl');
					$.ajax({
						type: "get", dataType: 'json', url: exurl, global: false,
						beforeSend: function () {
							parent.espcms_are_loading();
						},
						success: function (data) {
							parent.$("#espcms_are_loading").dialog("close");
							if (data.code === 'true') {
								parent.$.espcms_sticky(data.message, {'autoclose': 3000});
							} else {
								parent.$.espcms_sticky('[%pack:database_pack-espcms_lable_database_opt_save_no%]', {'autoclose': 3000});
							}
							parent.frames['[%$par_iframes_name%]'].refresh('ajax_list');
						}
					});
				});
			}
			[%/if%]
		</script>
	</head>

	<body class="espcms_style_all">
		<div class="main">
			<div class="espcms_center_content_list vt">

				<div class="panel_list_button kill_copy">
					[%if @this->power('backDatabase')%]
					<button class="btn btn-addblue btn-sm espcms_tab_link" tab_name="[%pack:database_pack-espcms_lable_database_bak_botton%]" tab_url="[%$link.bak%]" tab_close="false" tab_icon="glyphicons glyphicons-server-plus"><span class="glyphicons glyphicons-server-plus" aria-hidden="true"></span>[%pack:database_pack-espcms_lable_database_bak_botton%]</button>
					[%/if%]
					[%if @this->power('recoverDatabase')%]
					<button class="btn btn-addblue btn-sm espcms_tab_link" tab_name="[%pack:database_pack-espcms_lable_database_recover_botton%]" tab_url="[%$link.recover%]" tab_close="false" tab_icon="glyphicons glyphicons-server-new"><span class="glyphicons glyphicons-server-new" aria-hidden="true"></span>[%pack:database_pack-espcms_lable_database_recover_botton%]</button>
					[%/if%]
					[%if @this->power('delDatabase')%]
					<button class="btn btn-danger btn-sm espcms_tab_link" tab_name="[%pack:database_pack-espcms_lable_database_del_botton%]" tab_url="[%$link.delfile%]" tab_icon="espcms_icon_fa espcms_icon_fa-trash-o"><span class="espcms_icon_fa espcms_icon_fa-trash-o" aria-hidden="true"></span>[%pack:database_pack-espcms_lable_database_del_botton%]</button>
					[%/if%]
					[%if @this->power('optimizeDatabase')%]
					<button type="button" exurl="[%$link.opt%]" class="btn btn-green optbutton btn-sm"><span class="glyphicons glyphicons-server-flag" aria-hidden="true"></span>[%pack:database_pack-espcms_lable_database_opt_botton%]</button>
					[%/if%]
					<button class="btn btn-lightgray btn-sm refresh"><span class="espcms_icon_fa espcms_icon_fa-refresh" aria-hidden="true"></span>[%pack:botton_pack-espcms_botton_refresh%]</button>
				</div>
				<div class="panel">
					<form name="ajax_list" method="post" id="ajax_list">
						<input type="hidden" name="listurl" id="listurl" value="[%$link.list%]"/>
						<input type="hidden" name="loadname" id="loadname" value="#loadingstr"/>
						<div id="loadingtable" class="displaynone"><div class="loading_pic"></div></div>
						<div class="panel-body p0" id="loadingstr"></div>
					</form>
				</div>
			</div>
		</div>
	</body>
</html>
